package com.ruoyi.standingbook.extermination.mapper;

import com.ruoyi.common.core.mapper.BaseMapperPlus;
import com.ruoyi.common.domain.vo.StatisticsExterminationVo;
import com.ruoyi.standingbook.extermination.domain.Extermination;
import com.ruoyi.standingbook.extermination.domain.bo.ExterminationBo;
import com.ruoyi.standingbook.extermination.domain.bo.ExterminationPicBo;
import com.ruoyi.standingbook.extermination.domain.vo.ExterminationVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 四害消杀Mapper接口
 *
 * @author cc
 * @date 2023-04-30
 */
public interface ExterminationMapper extends BaseMapperPlus<ExterminationMapper, Extermination, ExterminationVo> {

    /**
     * 统计今天消杀次数
     */
    Long  statisticsTodayFrequency();

    /**
     * 统计历史消杀次数
     */
    Double  statisticsTotalFrequency();

    /**
     * 统计今天消杀情况分组列表
     */
    List<StatisticsExterminationVo> statisticsTodayExterminationList();

    /**
     * 统计指定月消杀情况分组列表
     */
    List<StatisticsExterminationVo> statisticsMonthExterminationList(ExterminationBo bo);

    /**
     * 四害消杀列表查询
     */
    List<ExterminationVo> exterminationList(ExterminationBo bo);

    List<ExterminationPicBo> selectPicByDate(@Param("date") String date);

    List<Integer> selectSumByDate(@Param("date") String date,@Param("status") String status);

    Integer statisticsNumYearToNow();
}
